// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   MsgConfigPO.java

package com.vandagroup.common.msgexchange;

import com.vandagroup.common.bean.FormBean;
import com.vandagroup.common.po.CosPO;
import java.sql.*;

// Referenced classes of package com.vandagroup.common.msgexchange:
//            MsgConfigFormBean

public class MsgConfigPO extends CosPO
{

    MsgConfigFormBean formBean;

    public MsgConfigPO()
    {
        formBean = new MsgConfigFormBean();
    }

    public MsgConfigFormBean getMsgconfigForm()
    {
        return formBean;
    }

    public void setMsgconfigForm(MsgConfigFormBean formBean)
    {
        this.formBean = formBean;
    }

    public FormBean fetchResult(ResultSet rs)
        throws SQLException
    {
        MsgConfigFormBean bean = new MsgConfigFormBean();
        bean.setTranCode(rs.getString("TRANCODE"));
        bean.setTranitem(rs.getString("TRANITEM"));
        bean.setMaxlength(new Integer(rs.getInt("MAXLENGTH")));
        return bean;
    }

    public String getColumnNames()
    {
        return "TRANCODE, TRANITEM, MAXLENGTH";
    }

    public String getInsertValuesString()
    {
        return "?, ?, ?";
    }

    public String getTableName()
    {
        return "MSGCONFIG";
    }

    public String getUpdateValuesString()
    {
        return "TRANCODE=?, TRANITEM=?, MAXLENGTH=?";
    }

    public void prepareInsertStatement(PreparedStatement ps)
        throws SQLException
    {
        ps.setString(1, formBean.getTranCode());
        ps.setString(2, formBean.getTranitem());
        prepareSetInt(ps, 3, formBean.getMaxlength());
    }

    public void prepareUpdateStatement(PreparedStatement ps)
        throws SQLException
    {
        ps.setString(1, formBean.getTranCode());
        ps.setString(2, formBean.getTranitem());
        prepareSetInt(ps, 3, formBean.getMaxlength());
    }
}
